package com.efast.dmom.mgmt.controller.mes;

import java.util.List;
import java.util.Map;

import com.efast.cafe.framework.bean.ResultBean;
import com.efast.dmom.mgmt.bean.mes.ProductExcuteDto;
import com.efast.dmom.mgmt.service.mes.TrBasProductCfgRepaircodeService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping(value="/trBasProductCfgRepaircode")
public class TrBasProductCfgRepaircodeController {
	@Autowired
	private TrBasProductCfgRepaircodeService trBasProductCfgRepaircodeService;
	
	//获取产品过程定义的维修代码作为下拉框取值
	@RequestMapping(value="/getDefRepCode")
	public @ResponseBody ResultBean getDefCode(@RequestBody Map<Object,Object> map) {
		ResultBean resultBean = new ResultBean(true,"");
		List<ProductExcuteDto> dtoList = trBasProductCfgRepaircodeService.getDefCode((Integer)map.get("productConfigId"));
		resultBean.setObject(dtoList);
		return resultBean;
	}
}
